package com.wangyadong.hobby.schedule.jobtask.designparrent;

import com.wangyadong.hobby.excel.export.demo.ExcelExportDemo;
import com.wangyadong.hobby.front.model.WemailRecord;
import com.wangyadong.hobby.front.model.WuserInfo;
import com.wangyadong.hobby.schedule.jobtask.dsa.ArrayList;
import com.wangyadong.hobby.schedule.jobtask.dsa.List;

import java.beans.Beans;
import java.io.*;
import java.util.Collections;
import java.util.concurrent.LinkedBlockingQueue;

public class W implements Serializable, Cloneable {

    private List list = new ArrayList<>();

    static {

    }

    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {
        WuserInfo wuserInfo = new WuserInfo();
        wuserInfo.setUserName("wangyadong");
        WemailRecord record = new WemailRecord();
        record.setEmail("77777@qq.com");
        wuserInfo.setRecord(record);
        ExcelExportDemo demo = new ExcelExportDemo();
        demo.setName("wangyadong");

        record.setDemo(demo);
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
        objectOutputStream.writeObject(wuserInfo);
        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
        ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
        WuserInfo userInfo = (WuserInfo) objectInputStream.readObject();
        System.out.println("============" + userInfo);
        Collections.synchronizedList(new java.util.ArrayList<>());
        OutterFlag:
        for (int i = 0; i < 10; i++) {
            System.out.println("Outer is " + i);
            for (int j = 0; j < 10; j++) {
                if (j == 5) {
                    break OutterFlag ;
                }
                System.out.println("inner is " + j);
            }
        }


        byte b = 41;

    }
}
